package com.g1.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.g1.entity.Admin;
import com.g1.mapper.AdminMapper;
import com.g1.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminMapper adminMapper;
    @Override
    public Admin login(Admin admin) {
        Admin loginAdmin = adminMapper.selectOne(new QueryWrapper<Admin>().eq("username", admin.getUsername()).eq("password", admin.getPassword()));
        return loginAdmin;
    }
}
